@import '../node_modules/compass-mixins/lib/compass/support';
@import '../node_modules/compass-mixins/lib/compass/css3';

@mixin multiline_texts_excerpt($font-size: 1em, $line-height: 1.15, $lines-to-show: 2, $bg-color: transparent) {
  line-height: $line-height;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: $bg-color;

  /* Fallback for non-webkit */
  display: block;
  max-height: $lines-to-show * $line-height;

  /* Only for non-webkit */
  display: -webkit-box;
  -webkit-line-clamp: $lines-to-show;
  -webkit-box-orient: vertical;
  white-space: normal;

  // @note: Probably doesn't need.
  /*@-moz-document url-prefix() {

        position: relative;
        padding-right: $font-size * 1.1;
        overflow: hidden;

        &:before {
            background-color: $bg-color;
            bottom: 0;
            position: absolute;
            right: 0;
            float: right;
            text-align:right;
            content: '\2026';
            width: $font-size * 1.1;
        }

        &:after {
            content: '';
            position: absolute;
            height: 100%;
            width: 100%;
            z-index: +1;
            background: $bg-color;
        }
    }*/
}

$theme-color: #009933;

/* BIG PLAY BUTTON */

$big-play-button: true;
$center-big-play-button: true;

$big-play-width: 2.65em;
$big-play-height: $big-play-width * (9/16);
$big-play-radius: 0.15em;
$big-play-font-size: 2.5em;

/* COLORS */

/* @note: Keep in colors 6-digits hex format. */

$primary-foreground-color: #ffffff;
$primary-background-color: #000000;

/* FONT SIZE */

$default-font-size: 13px;
$default-fullscreen-font-size: 16px;

/* DIMENSIONS */

$control-bar-height: 36px;

$progress-bar-height: 30px;

$control-bar-button-min-width: $control-bar-height;

$control-bar-fullscreen-height: 52px;
$volume-horizontal-slider-height: 3px;
$volume-horizontal-slider-fullscreen-height: 5px;

/* SPACES */

$control-bar-horizontal-space: 12px;

$corner-layer-edge-space: $control-bar-horizontal-space;

/* ANIMATIONS */

$vjs-actions-anim-width: 7.375em;

$fullscreenToggleAnimationDuration: 0.4s;

$controlBarAnimationsDuration: 0.1s;

/* FUNCTIONS */

/*@function calc_($expression) {
    @return $expression;
}*/

/*  ANIMATION KEYFRAMES */

@keyframes onHoverFullscreenToggle {
  50% {
    font-size: $default-font-size + 1px;
    margin-top: -1px;
  }

  100% {
    font-size: $default-font-size;
    margin-top: 0;
  }
}

@-webkit-keyframes onHoverFullscreenToggle {
  50% {
    font-size: $default-font-size + 1px;
    margin-top: -1px;
  }

  100% {
    font-size: $default-font-size;
    margin-top: 0;
  }
}

@keyframes onFullscreenHoverFullscreenToggle {
  50% {
    font-size: $default-fullscreen-font-size - 1px;
    margin-top: 1px;
  }

  100% {
    font-size: $default-fullscreen-font-size;
    margin-top: 0;
  }
}

@-webkit-keyframes onFullscreenHoverFullscreenToggle {
  50% {
    font-size: $default-fullscreen-font-size - 1px;
    margin-top: 1px;
  }

  100% {
    font-size: $default-fullscreen-font-size;
    margin-top: 0;
  }
}

@keyframes onDisplayingActionAnimation {
  0% {
    transform: scale(0.5);
  }

  10% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

@-webkit-keyframes onDisplayingActionAnimation {
  0% {
    transform: scale(0.5);
  }

  10% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

@-webkit-keyframes spinner-linear-spin {
  to {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spinner-linear-spin {
  to {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes spinner-ease-spin {
  12.5% {
    -webkit-transform: rotate(135deg);
  }

  25% {
    -webkit-transform: rotate(270deg);
  }

  37.5% {
    -webkit-transform: rotate(405deg);
  }

  50% {
    -webkit-transform: rotate(540deg);
  }

  62.5% {
    -webkit-transform: rotate(675deg);
  }

  75% {
    -webkit-transform: rotate(810deg);
  }

  87.5% {
    -webkit-transform: rotate(945deg);
  }

  to {
    -webkit-transform: rotate(1080deg);
  }
}

@keyframes spinner-ease-spin {
  12.5% {
    transform: rotate(135deg);
  }

  25% {
    transform: rotate(270deg);
  }

  37.5% {
    transform: rotate(405deg);
  }

  50% {
    transform: rotate(540deg);
  }

  62.5% {
    transform: rotate(675deg);
  }

  75% {
    transform: rotate(810deg);
  }

  87.5% {
    transform: rotate(945deg);
  }

  to {
    transform: rotate(1080deg);
  }
}

@-webkit-keyframes spinner-left-spin {
  0% {
    -webkit-transform: rotate(130deg);
  }

  50% {
    -webkit-transform: rotate(-5deg);
  }

  to {
    -webkit-transform: rotate(130deg);
  }
}

@keyframes spinner-left-spin {
  0% {
    transform: rotate(130deg);
  }

  50% {
    transform: rotate(-5deg);
  }

  to {
    transform: rotate(130deg);
  }
}

@-webkit-keyframes spinner-right-spin {
  0% {
    -webkit-transform: rotate(-130deg);
  }

  50% {
    -webkit-transform: rotate(5deg);
  }

  to {
    -webkit-transform: rotate(-130deg);
  }
}

@keyframes spinner-right-spin {
  0% {
    transform: rotate(-130deg);
  }

  50% {
    transform: rotate(5deg);
  }

  to {
    transform: rotate(-130deg);
  }
}

@keyframes showPreviewThumb {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@-webkit-keyframes showPreviewThumb {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* MediaCmsVideoJsIcons FONT ICONS */

.video-js.vjs-mediacms .vjs-subtitles-control .vjs-icon-placeholder {
  font-family: MediaCmsVideoJsIcons;
  font-weight: normal;
  font-style: normal;
}

.video-js.vjs-mediacms .vjs-subtitles-control .vjs-icon-placeholder:before {
  content: '\f107';
}

.video-js.vjs-mediacms .vjs-theater-mode-control .vjs-icon-placeholder {
  font-family: MediaCmsVideoJsIcons;
  font-weight: normal;
  font-style: normal;
}

.video-js.vjs-mediacms .vjs-theater-mode-control .vjs-icon-placeholder:before {
  content: '\f101';
}

.video-js.vjs-mediacms .vjs-theater-mode .vjs-theater-mode-control .vjs-icon-placeholder:before {
  content: '\f102';
}

.video-js.vjs-mediacms {
  font-size: $default-font-size;
  color: $primary-foreground-color;

  width: 100%;
  height: 100%;

  overflow: hidden;

  outline-color: rgba(0, 0, 0, 0);
  outline-color: transparent;

  video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    outline-color: rgba(0, 0, 0, 0);
    outline-color: transparent;
  }

  &.vjs-native-dimensions {
    video {
      width: auto;
      height: auto;
    }
  }

  /* Doesn't work properly in Safari browser.*/
  /*&.vjs-loading-video {
        video {
            opacity: 0;
            visibility: hidden;
        }
    }*/

  &.vjs-error {
    .vjs-error-display {
      display: table;
      color: rgb(238, 238, 238);
      text-shadow: 0.05em 0.05em 0.1em #000;

      &:before,
      &:after {
        position: absolute;
        top: 50%;
        left: 0.25em;
        display: block;
        width: 52px;
        height: 52px;
        line-height: 52px;
        margin-top: -26px;
        text-align: center;
        font-size: 3em;
      }

      &:before {
        content: '';
        border-radius: 50%;
        border: 4px solid #fff;
      }

      &:after {
        content: '!';
      }

      .vjs-modal-dialog-content {
        position: relative;
        display: table-cell;
        vertical-align: middle;
        text-align: initial;
        padding: 16px 1em 16px 80px;
        font-size: 1.384615em;
        word-break: break-all;
      }
    }
  }

  .vjs-left-controls,
  .vjs-right-controls {
    position: relative;
    width: auto;
    display: inline-block;
    height: $control-bar-height;
    overflow: hidden;
  }

  .vjs-left-controls {
  }

  .vjs-right-controls {
    float: right;
  }

  button {
    /* link: https://hackernoon.com/removing-that-ugly-focus-ring-and-keeping-it-too-6c8727fefcd2 */
    &:focus,
    &:active {
      // outline: 0;
    }

    &:active {
      &:focus {
        // outline: 0;
      }
    }
  }

  .vjs-subtitles-control {
    cursor: pointer;
  }

  &.vjs-subtitles-on {
    .vjs-subtitles-control {
      .vjs-icon-placeholder:after {
        content: '';
        display: block;
        position: absolute;
        width: 45%;
        left: 27.5%;
        height: 0.18em;
        bottom: 50%;
        margin-bottom: -1em;
        background-color: $theme-color;
      }
    }

    &.vjs-fullscreen {
      .vjs-subtitles-control {
        .vjs-icon-placeholder:after {
          width: 42%;
          left: 29%;
        }
      }
    }
  }

  .vjs-text-track-cue {
    > * {
      // white-space:pre-wrap;
      // display:inline-block !important;
      // padding: 0 0.25em;
      // line-height:1.25;
      color: #fff !important;
      fill: #fff;
      background-color: rgb(8, 8, 8) !important;
      background-color: rgba(8, 8, 8, 0.75) !important;
      font-family: Roboto, 'Arial Unicode Ms', Arial, Helvetica, Verdana, 'PT Sans Caption', sans-serif !important;
    }
  }

  .vjs-settings-control {
    font-size: 1.375em;
    cursor: pointer;
  }

  .vjs-settings-panel {
    .vjs-setting-panel-title > [role='button'] {
      position: relative;

      &:focus {
        outline-color: #fff;
        // outline-offset:-1px;
        outline-style: solid;
        outline-width: 1px;
      }
    }

    position: absolute;
    bottom: $control-bar-height - 6;
    right: 0;

    // width: 16em;
    // width: 250px;
    width: 23.75em;
    min-width: 210px;

    display: none;
    font-size: 0.8125em;
    z-index: +1;

    &:focus {
      outline: 0;
    }

    /*display:block;
        opacity: 0;
        height:0;
        visibility: hidden;
        @include transition( opacity 0.25s cubic-bezier(0.0,0.0,0.2,1) );
        will-change:height;*/

    &.vjs-visible-panel {
      display: block;
      /*opacity: 1;
            visibility: visible;
            height:auto;*/
    }

    .vjs-settings-panel-inner {
      display: block;
      margin: 0 0 1em;
      padding: 0.5em 0;
      border-radius: 0.2em;

      // background-color: #282828;
      // background-color: rgba(40, 40, 40, .8);
      background-color: rgba(28, 28, 28, 0.9);
      text-shadow: 0 0 2px rgba(#000, 0.5);

      max-height: 210px;
      max-height: 50vh;

      overflow: auto;
    }

    .vjs-setting-panel-title {
      color: #eee;
      padding-bottom: 0.25em;
      margin-bottom: 0.5em;
      border-bottom: 1px solid rgba(255, 255, 255, 0.2);

      > *:first-child {
        display: inline-block;
        padding: 0.75em 1em;
        font-size: 118%;
        font-weight: 500;

        &[role='button'] {
          padding: 0.5em 1em 0.5em 0;
          margin-left: 0.75em;
          margin-bottom: 0.25em 0.25em 0.5em;
        }
      }

      &.vjs-settings-back {
        > *:first-child {
          cursor: pointer;

          &:before {
            content: '\f103';
            font-family: 'MediaCmsVideoJsIcons';
            font-size: 1.25em;
            vertical-align: text-bottom;
            padding-right: 0.5em;
          }
        }
      }
    }

    .vjs-settings-menu {
      display: table;
      width: 100%;
    }

    .vjs-settings-menu-item {
      position: relative;
      display: table-row;
      width: 100%;
      cursor: pointer;
      height: 3em;

      &:hover,
      &:focus {
        outline: 0;
        background-color: rgba(255, 255, 255, 0.1);
      }

      &.vjs-selected-quality,
      &.vjs-selected-speed {
        position: relative;

        .vjs-setting-menu-item-content {
          // position:relative;

          &:after {
            content: '\f104';
            font-family: 'MediaCmsVideoJsIcons';
            font-size: 1.25em;
            font-weight: normal;
            vertical-align: text-bottom;
            padding-left: 0.5em;
          }

          .auto-resolution-title {
            font-weight: lighter;
            color: rgb(238, 238, 238);
          }
        }
      }
    }

    .vjs-setting-menu-item-label,
    .vjs-setting-menu-item-content {
      display: table-cell;
      vertical-align: middle;
      padding: 0 1em;
      line-height: 1;
      font-size: 118%;
    }

    .vjs-setting-menu-item-label {
      font-weight: 500;
    }

    .vjs-setting-menu-item-content {
      text-align: right;
      font-weight: 700;

      &.auto-resolution {
        font-size: 109%;
        font-weight: 400;
      }
    }

    &.vjs-playback-speed-panel,
    &.vjs-resolutions-panel,
    &.vjs-subtitles-panel {
      z-index: +1;
      // width: 13em;

      .vjs-settings-menu-item {
        .vjs-setting-menu-item-content {
          text-align: left;
          padding-left: 2.75em;
        }

        &.vjs-selected-menu-item {
          .vjs-setting-menu-item-content {
            position: relative;
            padding-left: 0.75em;

            &:before {
              content: '\f105';
              font-family: 'MediaCmsVideoJsIcons';
              font-size: 1.25em;
              // vertical-align:text-bottom;
              line-height: 0.75;
              padding-right: 0.5em;
              float: left;
            }
          }
        }
      }
    }

    &.vjs-resolutions-panel {
      // width: 8.25em;
    }
  }

  .vjs-button.vjs-play-control,
  .vjs-button.vjs-next-button,
  .vjs-button.vjs-previous-button {
    overflow: hidden;
    cursor: pointer;
  }

  .vjs-button.vjs-next-button,
  .vjs-button.vjs-previous-button {
    font-family: VideoJS;
    font-weight: 400;
    font-style: normal;
  }

  .vjs-button.vjs-next-button {
    .vjs-icon-placeholder {
      &:before {
        content: '\f11f';
      }
    }
  }

  .vjs-button.vjs-previous-button {
    .vjs-icon-placeholder {
      &:before {
        content: '\f120';
      }
    }
  }

  @if $big-play-button {
    .vjs-big-play-button {
      width: $big-play-width;
      height: $big-play-height;
      line-height: $big-play-height;
      font-size: $big-play-font-size;
      outline: 0;
      border: 0;
      border-radius: $big-play-radius;
      background-color: $primary-background-color;
      background-color: rgba($primary-background-color, 0.7);
      transition-duration: 0.2s;

      @if $center-big-play-button {
        top: 50%;
        left: 50%;
        margin-left: $big-play-width / -2;
        margin-top: $big-play-height / -2;
      } @else {
        left: 0.5em;
        top: 0.5em;
      }
    }

    &.vjs-changing-resolution .vjs-big-play-button {
      display: none;
    }
  }

  .vjs-bottom-bg {
    position: absolute;
    bottom: 0;
    left: $control-bar-horizontal-space / -1;
    right: $control-bar-horizontal-space / -1;
    height: $control-bar-height;
    display: block;
    pointer-events: none;
    background: rgba(#000, 0.1);
    background: -moz-linear-gradient(top, rgba(#000, 0) 0%, rgba(#000, 0.55) 100%);
    background: -webkit-gradient(
      left top,
      left bottom,
      color-stop(0%, rgba(#000, 0)),
      color-stop(100%, rgba(#000, 0.55))
    );
    background: -webkit-linear-gradient(top, rgba(#000, 0) 0%, rgba(#000, 0.55) 100%);
    background: -o-linear-gradient(top, rgba(#000, 0) 0%, rgba(#000, 0.55) 100%);
    background: -ms-linear-gradient(top, rgba(#000, 0) 0%, rgba(#000, 0.55) 100%);
    background: linear-gradient(to bottom, rgba(#000, 0) 0%, rgba(#000, 0.55) 100%);
  }

  .vjs-control-bar {
    z-index: +4;
    width: auto;
    left: $control-bar-horizontal-space;
    right: $control-bar-horizontal-space;
    background: none;
    text-shadow: 0 1px 3px rgba(#000, 0.05);

    .vjs-button {
      &:focus {
        outline-width: 0;
      }

      &[key-focus] {
        &:focus {
          &:after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: block;
            border-radius: 1px;
            border: 2px solid rgba(#fff, 0.75);
          }
        }
      }

      .vjs-icon-placeholder:before {
        margin-top: -2px;
      }
    }
  }

  .vjs-menu-button .vjs-menu-content {
    background-color: $primary-background-color;
    background-color: rgba($primary-background-color, 0.7);
  }

  .vjs-slider {
    &:focus {
      text-shadow: none;
      box-shadow: none;
    }

    background-color: $primary-foreground-color;
    background-color: rgba($primary-foreground-color, 0.25);
  }

  .vjs-slider-bar {
    background: rgba($primary-foreground-color, 0.25);

    &.vjs-play-progress {
      background-color: $primary-foreground-color;
    }
  }

  .vjs-load-progress {
    background: none;

    div {
      background-color: $primary-foreground-color;
      background-color: rgba($primary-foreground-color, 0.25);
    }
  }

  .vjs-volume-level {
    background: $primary-foreground-color;

    &:before {
      line-height: 1;
      top: -4px;
      font-size: 12px;
    }
  }

  .vjs-time-divider,
  .vjs-duration,
  .vjs-current-time,
  &.vjs-no-flex .vjs-duration,
  &.vjs-no-flex .vjs-current-time {
    display: block;
  }

  .vjs-current-time {
    margin-left: 0.45em;
  }

  .vjs-control {
    display: inline-block;
    float: left;
    padding: 0;
    min-width: 0;
    width: $control-bar-button-min-width;
    line-height: $control-bar-height - 2px;

    text-shadow: 0 1px 3px rgba(#000, 0.05);

    &:focus:before,
    &:hover:before,
    &:focus {
      // text-shadow: none;
      text-shadow: 0 1px 3px rgba(#000, 0.05);
    }

    &.vjs-mute-control {
      &.vjs-vol-1 {
        .vjs-icon-placeholder:before {
          margin-left: -0.17em;
        }
      }

      &.vjs-vol-2 {
        .vjs-icon-placeholder:before {
          margin-left: -0.08em;
        }
      }
    }

    &.vjs-disabled {
      &.vjs-picture-in-picture-control {
        display: none;
      }
    }
  }

  .vjs-progress-control {
    $progress-holder-height: 0.3em;

    position: absolute;
    // bottom: 100%;
    top: -1 * $progress-holder-height;
    left: 0;
    display: block;
    flex: none;
    width: 100%;
    height: auto;
    z-index: +1;
    padding-top: $progress-bar-height - 1px;
    height: $progress-bar-height;

    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -o-tap-highlight-color: transparent;
    tap-highlight-color: transparent;

    .vjs-play-progress,
    .vjs-mouse-display {
      .vjs-time-tooltip {
        line-height: 1;
        font-size: 11px;
        font-weight: 600;
        height: auto;
        padding: 8px 12px;
        border-radius: 2px;
      }
    }

    .vjs-progress-holder {
      height: $progress-holder-height;
      margin: 0;
      box-shadow: 0 1px 3px 0 rgba(#000, 0.05);

      &:focus {
        outline-width: 0;
      }

      &[key-focus] {
        &:focus {
          &:after {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            display: block;
            border-radius: 1px;
            border: 2px solid rgba(#fff, 0.75);
          }
        }
      }

      .vjs-play-progress {
        line-height: 1em;

        &:before {
          top: 50%;
          margin-top: -0.5em;
          text-shadow: 0 1px 3px rgba(#000, 0.05);
        }
      }
    }

    .vjs-play-progress {
      &:before {
        font-size: 1em;
        display: none;
      }
    }

    &:hover,
    .vjs-progress-holder:focus {
      .vjs-play-progress {
        &:before {
          display: block;
        }
      }
    }

    &:hover .vjs-progress-holder,
    .vjs-progress-holder:focus {
      font-size: 1.2875em;
    }

    &:hover {
      .vjs-play-progress .vjs-time-tooltip,
      .vjs-progress-holder:focus .vjs-play-progress .vjs-time-tooltip {
        display: none;
      }
    }
  }

  .vjs-time-control {
    display: inline-block;
    float: left;
    min-width: 0;
    height: $control-bar-height;
    line-height: $control-bar-height - 2px;
    width: auto;
    padding: 1px 0 0;
    text-align: center;
    font-size: 0.975em;

    &.vjs-time-divider {
      min-width: 1em;
      text-align: center;
    }
  }

  .vjs-fullscreen-control {
    overflow: hidden;
    cursor: pointer;

    &:hover {
      animation-duration: $fullscreenToggleAnimationDuration;
      animation-name: onHoverFullscreenToggle;
    }
  }

  .vjs-theater-mode-control {
    overflow: hidden;
    cursor: pointer;
  }

  .vjs-volume-panel {
    &.vjs-volume-panel-horizontal {
      min-width: $control-bar-button-min-width;
      width: 0;
      overflow: hidden;
    }

    &.vjs-volume-panel-horizontal:hover,
    &.vjs-volume-panel-horizontal:active,
    &.vjs-volume-panel-horizontal.vjs-slider-active {
      width: 9em;
      transition: all 0s;
    }

    .vjs-volume-control {
      position: absolute;
      top: 0;
      left: $control-bar-height;
      height: $control-bar-height;
      width: 0;
      visibility: visible;
      opacity: 1;

      &.vjs-volume-horizontal {
        margin-left: 0.45em;
        margin-right: 0.45em;
        transition: all 0s;
      }
    }

    &:hover .vjs-volume-control.vjs-volume-horizontal,
    &:active .vjs-volume-control.vjs-volume-horizontal,
    &:focus .vjs-volume-control.vjs-volume-horizontal,
    .vjs-volume-control:hover.vjs-volume-horizontal,
    .vjs-volume-control:active.vjs-volume-horizontal,
    .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal,
    .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {
      position: absolute;
      width: 5.5em;
      height: $control-bar-height;
    }

    .vjs-volume-bar {
      &:focus {
        outline-width: 0;
      }

      &[key-focus] {
        &:focus {
          &:after {
            content: '';
            position: absolute;
            top: -1em;
            left: -0.5em;
            right: -0.5em;
            bottom: -1em;
            display: block;
            border-radius: 1px;
            border: 2px solid rgba(#fff, 0.75);
          }
        }
      }
    }

    .vjs-volume-bar.vjs-slider-horizontal {
      margin: (0.5 * ($control-bar-height - $volume-horizontal-slider-height)) 0.45em
        (0.5 * ($control-bar-height - $volume-horizontal-slider-height)) 0;
    }

    .vjs-volume-bar.vjs-slider-horizontal,
    .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
      height: $volume-horizontal-slider-height;
    }

    &.vjs-volume-panel-horizontal,
    &.vjs-volume-panel-horizontal:hover {
      transition: width 0.35s linear;
      /* transition: width 0s linear; */
    }

    .vjs-volume-control.vjs-volume-horizontal,
    &:hover .vjs-volume-control.vjs-volume-horizontal,
    &:active .vjs-volume-control.vjs-volume-horizontal,
    &:focus .vjs-volume-control.vjs-volume-horizontal,
    .vjs-volume-control:hover.vjs-volume-horizontal,
    .vjs-volume-control:active.vjs-volume-horizontal,
    .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal,
    .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {
      transition: width 0.2s linear;
      transition-delay: 0.15s;
      /* transition: width 0s linear;
            transition-delay: 0s; */
    }
  }

  .vjs-actions-anim {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    position: absolute;
    top: 50%;
    left: 50%;
    width: $vjs-actions-anim-width;
    height: $vjs-actions-anim-width;
    line-height: $vjs-actions-anim-width;
    margin-top: -0.5 * $vjs-actions-anim-width;
    margin-left: -0.5 * $vjs-actions-anim-width;
    display: block;
    text-align: center;
    border-radius: 50%;
    color: #eee;
    background-color: rgba(0, 0, 0, 0.25);
    visibility: hidden;
    opacity: 0;

    span {
      display: block;

      &:after {
        content: '';
        font-family: VideoJS;
        font-weight: normal;
        font-style: normal;
        font-size: 42px;
      }
    }

    &.just-paused {
      span:after {
        content: '\f103';
      }
    }

    &.started-playing {
      span:after {
        content: '\f101';
      }
    }

    &.volume-high {
      span:after {
        content: '\f107';
      }
    }

    &.volume-mid {
      span:after {
        content: '\f106';
      }
    }

    &.volume-low {
      span:after {
        content: '\f105';
      }
    }

    &.volume-mute {
      span:after {
        content: '\f104';
      }
    }

    &.moving-backward {
      span {
        &:after {
          content: '\f116';
        }
      }
    }

    &.moving-forward {
      span {
        transform: scale(-1, 1);

        &:after {
          content: '\f116';
        }
      }
    }

    &.moving-backward,
    &.moving-forward {
      &:before {
        content: '5';
        position: absolute;
        top: 2px;
        left: 0;
        right: 0;
        bottom: 0;
        display: block;
        font-size: 10px;
        font-weight: 700;
        font-family: Arial, sans-serif;
      }
    }

    &.play_previous {
      span {
        &:after {
          content: '\f120';
        }
      }
    }

    &.play_next {
      span {
        &:after {
          content: '\f11f';
        }
      }
    }
  }

  .vjs-corner-layer {
    position: absolute;
    display: block;
    z-index: +1;

    &.vjs-corner-top-left,
    &.vjs-corner-top-right {
      top: $corner-layer-edge-space;
    }

    &.vjs-corner-bottom-left,
    &.vjs-corner-bottom-right {
      bottom: $corner-layer-edge-space;

      transition-duration: $controlBarAnimationsDuration;
      transition-property: bottom;
    }

    &.vjs-corner-top-left,
    &.vjs-corner-bottom-left {
      left: $corner-layer-edge-space;
    }

    &.vjs-corner-top-right,
    &.vjs-corner-bottom-right {
      right: $corner-layer-edge-space;
    }

    &.vjs-corner-top-left {
    }

    &.vjs-corner-top-right {
    }

    &.vjs-corner-bottom-left {
    }

    &.vjs-corner-bottom-right {
    }
  }

  &.vjs-fullscreen-change {
    .vjs-volume-panel {
      &.vjs-volume-panel-horizontal,
      &.vjs-volume-panel-horizontal:hover {
        transition: width 0s linear;
      }

      .vjs-volume-control.vjs-volume-horizontal,
      &:hover .vjs-volume-control.vjs-volume-horizontal,
      &:active .vjs-volume-control.vjs-volume-horizontal,
      &:focus .vjs-volume-control.vjs-volume-horizontal,
      .vjs-volume-control:hover.vjs-volume-horizontal,
      .vjs-volume-control:active.vjs-volume-horizontal,
      .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal,
      .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {
        transition: width 0s linear;
        transition-delay: 0s;
      }
    }
  }

  &.vjs-has-started,
  &.vjs-changing-resolution {
    .vjs-corner-layer {
    }

    .vjs-control-bar {
      display: block;
      height: $control-bar-height + $progress-bar-height;
      padding-top: $progress-bar-height;
      transition-duration: $controlBarAnimationsDuration;
      transition-property: transform, opacity, visibility;
    }

    .vjs-actions-anim {
      &.active-anim {
        visibility: visible;
        animation-duration: 0.75s;
        animation-name: onDisplayingActionAnimation;
      }
    }

    .vjs-corner-layer {
      &.vjs-corner-bottom-left,
      &.vjs-corner-bottom-right {
        bottom: $corner-layer-edge-space + $control-bar-height;
      }
    }

    &.vjs-user-inactive.vjs-playing {
      .vjs-corner-layer {
        &.vjs-corner-bottom-left,
        &.vjs-corner-bottom-right {
          bottom: $corner-layer-edge-space;
        }
      }

      .vjs-control-bar {
        transform: translate(0px, $control-bar-height);
      }
    }
  }

  &.vjs-fullscreen {
    font-size: $default-fullscreen-font-size;

    .vjs-left-controls,
    .vjs-right-controls {
      height: $control-bar-fullscreen-height;
    }

    .vjs-theater-mode-control {
      display: none;
    }

    .vjs-bottom-bg {
      height: $control-bar-fullscreen-height;
    }

    .vjs-settings-panel {
      bottom: $control-bar-fullscreen-height - 7px;
    }

    .vjs-control {
      width: $control-bar-fullscreen-height;
    }

    .vjs-time-control {
      width: auto;
    }

    .vjs-control,
    .vjs-time-control {
      height: $control-bar-fullscreen-height;
      line-height: $control-bar-fullscreen-height - 2px;
    }

    .vjs-progress-control.vjs-control {
      width: 100%;
      height: auto;
    }

    .vjs-control-bar {
      .vjs-button {
        .vjs-icon-placeholder:before {
          margin-top: 2px;
        }

        &.vjs-fullscreen-control {
          .vjs-icon-placeholder:before {
            font-size: 2em;
            line-height: 1.5;
          }
        }
      }
    }

    .vjs-volume-level {
      &:before {
        top: -5px;
        font-size: 14px;
      }
    }

    .vjs-fullscreen-control {
      &:hover {
        animation-name: onFullscreenHoverFullscreenToggle;
      }
    }

    .vjs-play-progress,
    .vjs-mouse-display {
      .vjs-time-tooltip {
        font-size: 12px;
      }
    }

    .vjs-volume-panel {
      .vjs-volume-bar.vjs-slider-horizontal {
        margin: (0.5 * ($control-bar-fullscreen-height - $volume-horizontal-slider-fullscreen-height)) 0.45em
          (0.5 * ($control-bar-fullscreen-height - $volume-horizontal-slider-fullscreen-height)) 0;
      }

      .vjs-volume-bar.vjs-slider-horizontal,
      .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
        height: $volume-horizontal-slider-fullscreen-height;
      }

      &.vjs-volume-panel-horizontal {
        min-width: $control-bar-fullscreen-height;
      }

      &.vjs-volume-panel-horizontal:hover,
      &.vjs-volume-panel-horizontal:active,
      &.vjs-volume-panel-horizontal.vjs-slider-active {
        width: 10em;
        transition: all 0s;
      }

      .vjs-volume-control {
        left: $control-bar-fullscreen-height;
        height: $control-bar-height;
      }

      .vjs-volume-control,
      &:hover .vjs-volume-control.vjs-volume-horizontal,
      &:active .vjs-volume-control.vjs-volume-horizontal,
      &:focus .vjs-volume-control.vjs-volume-horizontal,
      .vjs-volume-control:hover.vjs-volume-horizontal,
      .vjs-volume-control:active.vjs-volume-horizontal,
      .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal,
      .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {
        height: $control-bar-fullscreen-height;
      }

      &.vjs-volume-panel-horizontal,
      &.vjs-volume-panel-horizontal:hover {
        transition: width 0.3s linear;
      }

      .vjs-volume-control.vjs-volume-horizontal,
      &:hover .vjs-volume-control.vjs-volume-horizontal,
      &:active .vjs-volume-control.vjs-volume-horizontal,
      &:focus .vjs-volume-control.vjs-volume-horizontal,
      .vjs-volume-control:hover.vjs-volume-horizontal,
      .vjs-volume-control:active.vjs-volume-horizontal,
      .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal,
      .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {
        transition: width 0.2s linear;
        transition-delay: 0.1s;
      }
    }

    &.vjs-fullscreen-change {
      .vjs-volume-panel {
        &.vjs-volume-panel-horizontal,
        &.vjs-volume-panel-horizontal:hover {
          transition: width 0s linear;
        }

        .vjs-volume-control.vjs-volume-horizontal,
        &:hover .vjs-volume-control.vjs-volume-horizontal,
        &:active .vjs-volume-control.vjs-volume-horizontal,
        &:focus .vjs-volume-control.vjs-volume-horizontal,
        .vjs-volume-control:hover.vjs-volume-horizontal,
        .vjs-volume-control:active.vjs-volume-horizontal,
        .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal,
        .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {
          transition: width 0s linear;
          transition-delay: 0s;
        }
      }
    }

    .vjs-corner-layer {
      &.vjs-corner-bottom-left,
      &.vjs-corner-bottom-right {
        bottom: $corner-layer-edge-space + $control-bar-fullscreen-height;
      }
    }
  }

  &.vjs-has-started.vjs-fullscreen,
  &.vjs-changing-resolution.vjs-fullscreen {
    .vjs-control-bar {
      height: $control-bar-fullscreen-height + $progress-bar-height;
    }

    &.vjs-user-inactive.vjs-playing {
      .vjs-control-bar {
        transform: translate(0px, $control-bar-fullscreen-height);
      }
    }
  }

  &.vjs-enabled-touch-controls {
    .vjs-touch-controls {
      $touch-controls-icon-font-size: 2.625em;
      $touch-controls-play-icon-font-size: 56px;

      -webkit-tap-highlight-color: rgba(#000, 0);

      touch-action: none;
      pointer-events: none;

      z-index: +2;
      position: absolute;
      display: block;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      background-color: rgba(#000, 0.6);

      visibility: hidden;
      opacity: 0;

      transition-timing-function: linear;
      transition-duration: 0.1s;
      transition-property: opacity, visibility;

      button {
        pointer-events: auto;

        display: inline-block;
        width: auto;
        height: auto;
        line-height: 1;
        float: none;
        margin: 1rem;

        font-size: $touch-controls-icon-font-size;

        width: $touch-controls-play-icon-font-size;
        height: $touch-controls-play-icon-font-size;
        line-height: $touch-controls-play-icon-font-size;

        outline: 0;
        border-radius: 50%;
      }

      > * {
        position: absolute;
        display: block;
        top: 50%;
        left: 0;
        margin-top: -0.5 * ($touch-controls-play-icon-font-size + 32px);

        display: table;
        width: 100%;

        > * {
          display: table-cell;
          text-align: center;
          vertical-align: middle;
        }
      }

      .vjs-touch-previous-button {
        text-align: right;
      }

      .vjs-touch-play-button {
        width: 10.5em;
        text-align: center;

        button {
          font-size: $touch-controls-play-icon-font-size;
        }
      }

      .vjs-touch-play-button {
      }

      .vjs-touch-next-button {
        text-align: left;
      }

      .vjs-touch-hidden-button {
        * {
          visibility: hidden;
          opacity: 0;
        }
      }

      .vjs-touch-disabled-button {
        * {
          color: #404040;
          color: rgba(#fff, 0.25);
          cursor: disabled;
        }
      }
    }

    &.vjs-seeking,
    &.vjs-waiting,
    &.vjs-touch-enabled {
      .vjs-actions-anim {
        display: none;
      }
    }

    &.vjs-touch-enabled {
      .vjs-play-control,
      .vjs-next-button,
      .vjs-previous-button {
        display: none;
      }

      &.vjs-has-started {
        &.vjs-playing.vjs-user-active,
        &.vjs-paused {
          .vjs-touch-controls {
            visibility: visible;
            opacity: 1;
          }
        }
      }

      &.vjs-playing {
        .vjs-icon-play {
          &:before {
            content: '\f103';
          }
        }
      }

      &.vjs-ended {
        .more-media.full-wrapper {
          visibility: hidden;
        }

        .vjs-icon-play {
          &:before {
            content: '\f116';
          }
        }
      }
    }
  }
}

.video-js.vjs-mediacms {
  padding-top: 50%;

  video[poster] {
    object-fit: fill;
  }

  // $intense-color: red;
  $intense-color: $theme-color;
  // $intense-color: springgreen;
  // $intense-color: limegreen;
  // $intense-color: lawngreen;

  .vjs-progress-control {
    .vjs-progress-holder {
      // @include box-shadow( 0 1px 3px 0 rgba(#000, 0.1) );

      .vjs-play-progress {
        background-color: $intense-color;

        &:before {
          color: $intense-color;
        }
      }
    }
  }

  .vjs-poster {
    // animation: vjs-poster-reveal 2.5s;
    background-size: cover;
  }

  &.vjs-changing-resolution .vjs-poster {
    display: none;
  }

  .vjs-corner-layer {
    &.vjs-corner-top-left,
    &.vjs-corner-top-right {
      top: 16px;
    }

    &.vjs-corner-top-left {
      max-width: 80%;
    }

    &.vjs-corner-top-right {
    }

    .title-link,
    .user-thumb-link {
      outline: 0;
      transition-duration: 0.1s;
      transition-property: opacity, visibility;
    }

    .title-link {
      display: inline-block;
      font-size: 16px;
      font-stretch: 100%;
      text-decoration: none;
      text-shadow: 0 0 2px rgba(#000, 0.5);
      @include multiline_texts_excerpt(
        $font-size: 18px,
        $line-height: 23.4px,
        $lines-to-show: 2,
        $bg-color: transparent
      );
      color: #eee;

      &:hover {
        color: #fff;
      }

      @media screen and (min-width: 768px) {
        font-size: 18px;
      }
    }

    .user-thumb-link {
      position: relative;
      display: block;
      width: 36px;
      height: 36px;
      overflow: hidden;
      border-radius: 50%;
      margin-bottom: 4px;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
    }

    .media-links-top-left {
      display: block;

      .title-link {
        padding-left: 48px;
        padding-top: 7px;
      }

      .user-thumb-link {
        position: absolute;
        top: 0;
        left: 0;
        display: inline-block;
      }
    }
  }

  &.vjs-fullscreen {
    .vjs-corner-layer {
      .title-link {
        font-size: 16px;

        @media screen and (min-width: 768px) {
          font-size: 18px;
        }

        @media screen and (min-width: 992px) {
          font-size: 20px;
        }

        @media screen and (min-width: 1040px) {
          font-size: 22px;
        }
      }
    }
  }

  &.vjs-has-started {
    &.vjs-fullscreen {
    }

    &.vjs-user-inactive.vjs-playing {
      .vjs-corner-layer {
        .title-link,
        .user-thumb-link {
          opacity: 0;
          visibility: hidden;
        }
      }
    }
  }

  &:hover {
    @if $big-play-button {
      .vjs-big-play-button {
        background-color: $intense-color;
      }
    }
  }
}

/* @-webkit-keyframes vjs-poster-reveal {
    0%{
        opacity:0;
    }
    40%{
        opacity:0;
    }
    100%{
        opacity:1;
    }
}

@keyframes vjs-poster-reveal {
    0%{
        opacity:0;
    }
    40%{
        opacity:0;
    }
    100%{
        opacity:1;
    }
} */

.video-js.vjs-mediacms {
  .vjs-progress-control .vjs-mouse-display .vjs-time-tooltip,
  .vjs-preview-thumb .vjs-preview-thumb-time-display {
    font-size: 0.776699em;
    font-weight: 500;
    line-height: 1;
  }

  .vjs-progress-control .vjs-mouse-display .vjs-time-tooltip,
  .vjs-preview-thumb .vjs-preview-thumb-time-display > * {
    padding: 0.5em 0.65em 0.4em;
    color: rgba(#fff, 0.9);
    background-color: rgba(28, 28, 28, 0.95);
    border-radius: 2px;
  }

  .vjs-progress-control .vjs-mouse-display {
    background-color: rgba(28, 28, 28, 0.9);

    .vjs-time-tooltip {
      top: auto;
      bottom: 0.5em;
    }
  }

  .vjs-preview-thumb {
    display: none;
  }

  &.vjs-enabled-preview-thumb {
    .vjs-preview-thumb {
      position: relative;
      opacity: 0;
      visibility: hidden;
      display: block;

      .vjs-preview-thumb-inner {
        position: absolute;
        bottom: 1em;
        left: -80px;
        width: 160px;
        height: 120px;
        overflow: hidden;
        background-position: center 0;
        background-size: cover;
        background-color: rgba(28, 28, 28, 0.9);
        border: 2px solid rgba(28, 28, 28, 0.9);
        border-radius: 1px;
      }

      .vjs-preview-thumb-time-display {
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        line-height: 1;
        font-size: 1em;
        font-weight: 600;
        display: inline-block;

        > * {
          display: inline-block;
          padding: 0.5em 0.65em 0.45em;
        }
      }
    }

    .vjs-progress-control {
      &.andrd-active .vjs-preview-thumb,
      &:hover .vjs-preview-thumb,
      &:active .vjs-preview-thumb {
        // opacity: 1;
        visibility: visible;

        animation-name: showPreviewThumb;
        animation-duration: 0.2s;
        animation-timing-function: ease-out;
        animation-delay: 0.1s;
        animation-direction: alternate;
        animation-fill-mode: forwards;
      }
    }

    &.vjs-user-inactive {
      .vjs-progress-control {
        .vjs-preview-thumb {
          opacity: 0;
          visibility: hidden;
          @include transition(visibility 1s linear, opacity 1s linear);
        }
      }
    }

    &.vjs-touch-enabled {
      .vjs-preview-thumb {
        display: none;
      }
    }
  }
}

.video-js.vjs-mediacms {
  $spinner-color: #eee;

  $spinner-border-width: 6px;
  $spinner-container-width: 64px;

  $fullscreen-spinner-border-width: 1.5 * $spinner-border-width;
  $fullscreen-spinner-container-width: 1.5 * $spinner-container-width;

  .vjs-loading-spinner {
    width: $spinner-container-width;
    height: $spinner-container-width;
    margin: (-0.5 * $spinner-container-width) 0 0 (-0.5 * $spinner-container-width);

    border: 0;
    border-radius: 0;
    @include opacity(1);

    -webkit-animation-delay: 0.44s;
    animation-delay: 0.44s;

    &:after,
    &:before {
      display: none;
    }

    .spinner {
      z-index: +1;
      position: absolute;
      left: 50%;
      top: 50%;
      width: 100%;
      margin-left: (-0.5 * $spinner-container-width);
      pointer-events: none;
      background-color: $spinner-color;
    }

    .spinner-container {
      pointer-events: none;
      position: absolute;
      width: 100%;
      top: 50%;
      left: 50%;
      margin-top: -50%;
      margin-left: -50%;
      padding-bottom: 100%;
      animation: spinner-linear-spin 1568.23529647ms linear infinite;
      -webkit-animation: spinner-linear-spin 1568.23529647ms linear infinite;
    }

    .spinner-rotator {
      position: absolute;
      width: 100%;
      height: 100%;
      -webkit-animation: spinner-ease-spin 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
      animation: spinner-ease-spin 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
    }

    .spinner-left,
    .spinner-right {
      position: absolute;
      top: 0;
      bottom: 0;
      overflow: hidden;
    }

    .spinner-circle {
      position: absolute;
      width: 200%;
      height: 100%;
      box-sizing: border-box;
      border-radius: 50%;
      border-style: solid;
      border-width: $spinner-border-width;
      border-color: $spinner-color $spinner-color transparent;
    }

    .spinner-left {
      left: 0;
      right: 49%;

      .spinner-circle {
        left: 0;
        right: -100%;
        border-right-color: transparent;
        -webkit-animation: spinner-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
        animation: spinner-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
      }
    }

    .spinner-right {
      left: 49%;
      right: 0;

      .spinner-circle {
        left: -100%;
        right: 0;
        border-left-color: transparent;
        -webkit-animation: spinner-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
        animation: spinner-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1 1) infinite both;
      }
    }
  }

  &.vjs-fullscreen {
    .vjs-loading-spinner {
      width: $fullscreen-spinner-container-width;
      height: $fullscreen-spinner-container-width;
      margin: (-0.5 * $fullscreen-spinner-container-width) 0 0 (-0.5 * $fullscreen-spinner-container-width);

      .spinner {
        margin-left: (-0.5 * $fullscreen-spinner-container-width);
      }

      .spinner-circle {
        border-width: $fullscreen-spinner-border-width;
      }
    }
  }

  &.vjs-error {
    .vjs-loading-spinner {
      display: none;
    }
  }
}
